package com.erp.erp_dao.CustomerContact;

import com.erp.erp_entitys.CustomerContact.CustomerContactEntity;
import com.erp.erp_entitys.CustomerContact.CustomerContactExample;
import com.erp.erp_entitys.CustomerContact.CustomerContactVoEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ICustomerContactDAO {
    long countByExample(CustomerContactExample example);

    int deleteByExample(CustomerContactExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CustomerContactEntity record);

    int insertSelective(CustomerContactEntity record);

    List<CustomerContactEntity> selectByExample(CustomerContactExample example);
    List<CustomerContactVoEntity> query(Map map);
    List<CustomerContactVoEntity> query2(Map map);

    CustomerContactEntity selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CustomerContactEntity record, @Param("example") CustomerContactExample example);

    int updateByExample(@Param("record") CustomerContactEntity record, @Param("example") CustomerContactExample example);

    int updateByPrimaryKeySelective(CustomerContactEntity record);

    int updateByPrimaryKey(CustomerContactEntity record);

    List<CustomerContactEntity> selectByDim(String dim);

    /**
     * 根据邮件更新最后联系时间
     * @param email
     * @return
     */
    int updateByEmail(String email);
}